import request from '@/utils/request'

export default {
  getQuery(kind,capacity) {
    return request({
      url: `/main/room/getByQuery/${kind}/${capacity}`,
      method: 'get'
    })
  },

  list() {
    return request({
      url: `/main/room/list`,
      method: 'get'
    })
  },

  add(room) {
    return request({
      url: `/main/room/add`,
      method: 'post',
      data: room
    })
  },

  deleteById(id){
    return request({
      url: `/main/room/delete/${id}`,
      method: 'delete',
    })
  },
  getById(id){
    return request({
      url: `/main/room/getById/${id}`,
      method: 'get',
    })
  },
  update(room){
    return request({
      url: `/main/room/update`,
      method: 'put',
      data: room
    })
  },
}

